import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:convert';

part 'my_get_fanslist_response.freezed.dart';
part 'my_get_fanslist_response.g.dart';

@freezed
class MyGetFanslistResponse with _$MyGetFanslistResponse {
  const factory MyGetFanslistResponse({
    @JsonKey(name: "c") required int c,
    @JsonKey(name: "m") required String m,
    @JsonKey(name: "d") required D d,
  }) = _MyGetFanslistResponse;

  factory MyGetFanslistResponse.fromJson(Map<String, dynamic> json) =>
      _$MyGetFanslistResponseFromJson(json);
}

@freezed
class D with _$D {
  const factory D({
    @JsonKey(name: "followCount") required int followCount,
    @JsonKey(name: "fansCount") required int fansCount,
    @JsonKey(name: "like") required int like,
    @JsonKey(name: "fav_count") required String favCount,
    @JsonKey(name: "credit") required String credit,
  }) = _D;

  factory D.fromJson(Map<String, dynamic> json) => _$DFromJson(json);
}
